class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.t: E = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.o: D = None
        self.s: F = None
        self.t: F = None
        self.x: F = None
        self.r: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.r: G = None
        self.u: D = None
        self.z: C = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: C = None
        self.q: C = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.x: B = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
k = D("k")
d = E("d")
b = F("b")
m = G("m")
f = H("f")

l.r = m
l.p = m
l.z = k
l.t = d
l.s = j
j.q = f
j.y = l
j.o = k
j.s = b
j.t = b
j.x = b
j.r = d
j.u = m
i.x = k
i.y = k
i.p = m
k.y = j
k.t = f
d.p = f
d.v = i
d.z = i
d.r = m
d.u = k
d.q = l
d.w = b
b.w = k
b.s = i
b.q = i
b.r = f
b.y = m
m.r = i
f.w = m
f.q = k
f.x = j
f.u = j
f.r = b
assert d.u.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.t: E = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.o: D = None
        self.s: F = None
        self.t: F = None
        self.x: F = None
        self.r: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.r: G = None
        self.u: D = None
        self.z: C = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: C = None
        self.q: C = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.x: B = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
k = D("k")
d = E("d")
b = F("b")
m = G("m")
f = H("f")

l.r = m
l.p = m
l.z = k
l.t = d
l.s = j
j.q = f
j.y = l
j.o = k
j.s = b
j.t = b
j.x = b
j.r = d
j.u = m
i.x = k
i.y = k
i.p = m
k.y = j
k.t = f
d.p = f
d.v = i
d.z = i
d.r = m
d.u = k
d.q = l
d.w = b
b.w = k
b.s = i
b.q = i
b.r = f
b.y = m
m.r = i
f.w = m
f.q = k
f.x = j
f.u = j
f.r = b
assert d.u.y.o.txt == "k"