class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: H = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: G = None
        self.t: A = None
        self.p: B = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.y: D = None
        self.o: E = None
        self.p: H = None
        self.r: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: G = None
        self.t: A = None
        self.p: B = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.y: D = None
        self.o: E = None
        self.p: H = None
        self.r: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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