class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.p: D = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

i = A("i")
b = B("b")
k = C("k")
g = D("g")
j = E("j")
m = F("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.p: D = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

i = A("i")
b = B("b")
k = C("k")
g = D("g")
j = E("j")
m = F("m")

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