class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.x: E = None
        self.o: F = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.x: E = None
        self.o: F = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

i.r = k
i.x = h
i.u = e
e.y = c
e.w = k
e.x = b
e.o = a
e.z = g
e.p = i
k.s = h
k.y = e
k.t = c
h.p = a
h.z = i
g.p = k
a.z = i
b.p = k
c.z = i
assert c.z.u.p.u.p.txt == "i"