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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

d.t = h
d.v = h
d.x = j
d.p = l
d.y = l
b.x = e
b.q = e
b.u = l
b.y = l
b.z = g
h.o = e
h.q = j
j.r = e
j.o = k
j.t = d
j.s = d
e.z = k
e.w = h
k.s = e
k.y = e
k.r = l
l.t = h
l.v = h
l.x = j
l.p = d
l.y = d
g.r = e
g.o = k
g.t = d
g.s = d
assert g.o.s.w.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.v: C = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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