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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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