class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.r: B = None
        self.v: E = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

f = A("f")
d = B("d")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
l = B("l")
a = A("a")

f.t = j
f.v = j
f.y = a
f.z = a
f.r = d
f.w = i
d.v = c
d.o = c
m.r = j
m.o = j
m.z = d
m.t = c
c.q = j
c.u = j
c.y = m
j.s = c
j.z = l
j.q = l
i.o = c
l.v = c
l.o = c
a.t = j
a.v = j
a.y = f
a.z = f
a.r = l
a.w = i
assert a.y.w.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.r: B = None
        self.v: E = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

f = A("f")
d = B("d")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
l = B("l")
a = A("a")

f.t = j
f.v = j
f.y = a
f.z = a
f.r = d
f.w = i
d.v = c
d.o = c
m.r = j
m.o = j
m.z = d
m.t = c
c.q = j
c.u = j
c.y = m
j.s = c
j.z = l
j.q = l
i.o = c
l.v = c
l.o = c
a.t = j
a.v = j
a.y = f
a.z = f
a.r = l
a.w = i
assert a.y.w.o.q.txt == "j"