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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.txt = txt

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

d = A("d")
m = B("m")
j = C("j")
a = D("a")
g = E("g")
k = F("k")
b = D("b")
n = F("n")
e = A("e")

d.t = e
d.v = b
d.z = a
d.q = a
d.o = j
d.p = g
m.v = d
m.x = g
j.v = b
j.r = e
j.t = e
a.o = j
a.w = m
a.z = m
a.p = m
a.r = b
a.t = d
g.o = k
g.q = e
k.x = n
b.o = j
b.w = m
b.z = m
b.p = m
b.r = a
b.t = d
n.x = k
e.t = d
e.v = a
e.z = a
e.o = j
e.p = g
e.q = b
assert e.t.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.z: D = None
        self.o: C = None
        self.p: E = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.txt = txt

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

d = A("d")
m = B("m")
j = C("j")
a = D("a")
g = E("g")
k = F("k")
b = D("b")
n = F("n")
e = A("e")

d.t = e
d.v = b
d.z = a
d.q = a
d.o = j
d.p = g
m.v = d
m.x = g
j.v = b
j.r = e
j.t = e
a.o = j
a.w = m
a.z = m
a.p = m
a.r = b
a.t = d
g.o = k
g.q = e
k.x = n
b.o = j
b.w = m
b.z = m
b.p = m
b.r = a
b.t = d
n.x = k
e.t = d
e.v = a
e.z = a
e.o = j
e.p = g
e.q = b
assert e.t.p.o.txt == "k"