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

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

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

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

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

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

l = A("l")
d = B("d")
c = C("c")
b = D("b")
k = E("k")
m = F("m")
i = F("i")
h = E("h")

l.r = d
d.x = c
d.y = c
d.r = b
d.z = k
d.v = l
d.q = l
c.r = i
c.z = i
c.q = b
c.p = k
b.v = i
b.u = c
b.r = c
b.p = d
b.w = h
b.t = k
k.x = d
k.y = d
k.r = b
k.t = c
k.z = c
k.v = h
m.y = d
m.p = d
m.s = k
m.w = k
i.y = d
i.p = d
i.s = k
i.w = k
h.x = d
h.y = d
h.r = b
h.t = c
h.z = c
h.v = k
assert m.p.v.r.z.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

l = A("l")
d = B("d")
c = C("c")
b = D("b")
k = E("k")
m = F("m")
i = F("i")
h = E("h")

l.r = d
d.x = c
d.y = c
d.r = b
d.z = k
d.v = l
d.q = l
c.r = i
c.z = i
c.q = b
c.p = k
b.v = i
b.u = c
b.r = c
b.p = d
b.w = h
b.t = k
k.x = d
k.y = d
k.r = b
k.t = c
k.z = c
k.v = h
m.y = d
m.p = d
m.s = k
m.w = k
i.y = d
i.p = d
i.s = k
i.w = k
h.x = d
h.y = d
h.r = b
h.t = c
h.z = c
h.v = k
assert m.p.v.r.z.r.t.txt == "k"