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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.p: A = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

i = A("i")
b = B("b")
a = C("a")
h = D("h")
c = E("c")
e = F("e")
k = C("k")
f = B("f")
l = F("l")

i.z = h
i.x = l
i.p = b
i.t = c
b.z = a
b.t = k
b.q = c
a.o = c
a.p = f
a.q = f
a.r = l
h.z = e
h.v = e
c.o = a
c.z = a
c.w = i
c.r = k
c.q = h
e.t = l
e.s = l
e.z = h
e.p = i
e.y = i
k.o = c
k.p = f
k.q = b
k.r = l
f.z = a
f.t = a
f.q = c
l.t = e
l.s = e
l.z = h
l.p = i
l.y = i
assert k.o.r.r.y.p.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.p: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.p: A = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

i = A("i")
b = B("b")
a = C("a")
h = D("h")
c = E("c")
e = F("e")
k = C("k")
f = B("f")
l = F("l")

i.z = h
i.x = l
i.p = b
i.t = c
b.z = a
b.t = k
b.q = c
a.o = c
a.p = f
a.q = f
a.r = l
h.z = e
h.v = e
c.o = a
c.z = a
c.w = i
c.r = k
c.q = h
e.t = l
e.s = l
e.z = h
e.p = i
e.y = i
k.o = c
k.p = f
k.q = b
k.r = l
f.z = a
f.t = a
f.q = c
l.t = e
l.s = e
l.z = h
l.p = i
l.y = i
assert k.o.r.r.y.p.t.r.txt == "l"