class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.u: G = None
        self.y: H = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.y: G = None
        self.v: D = None
        self.u: A = None
        self.t: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.w: A = None
        self.y: G = None
        self.q: D = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.y: G = None
        self.v: D = None
        self.u: A = None
        self.t: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.w: A = None
        self.y: G = None
        self.q: D = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

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