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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.o: C = None
        self.p: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.u: B = None
        self.x: A = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

g = A("g")
n = B("n")
l = C("l")
a = D("a")
j = E("j")
h = F("h")
d = C("d")
k = F("k")

g.w = n
g.t = l
g.o = l
g.y = j
n.z = l
n.o = l
n.w = j
n.t = j
n.p = a
n.s = a
l.y = g
a.t = l
a.p = j
a.z = j
a.u = n
a.y = n
a.x = g
j.y = g
j.o = d
j.w = d
j.s = n
j.p = n
j.r = a
h.x = n
h.u = j
h.s = g
d.y = g
k.x = n
k.u = j
k.s = g
assert a.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: C = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.o: C = None
        self.p: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.u: B = None
        self.x: A = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

g = A("g")
n = B("n")
l = C("l")
a = D("a")
j = E("j")
h = F("h")
d = C("d")
k = F("k")

g.w = n
g.t = l
g.o = l
g.y = j
n.z = l
n.o = l
n.w = j
n.t = j
n.p = a
n.s = a
l.y = g
a.t = l
a.p = j
a.z = j
a.u = n
a.y = n
a.x = g
j.y = g
j.o = d
j.w = d
j.s = n
j.p = n
j.r = a
h.x = n
h.u = j
h.s = g
d.y = g
k.x = n
k.u = j
k.s = g
assert a.t.y.y.txt == "j"