class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: B = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

k = A("k")
d = B("d")
j = C("j")
m = D("m")
a = E("a")
c = F("c")
n = F("n")

k.y = m
k.v = d
d.r = j
j.t = a
j.u = a
j.p = k
j.q = k
j.z = c
m.y = d
m.w = d
m.t = d
m.o = d
m.x = k
m.r = k
a.o = j
a.q = c
a.u = k
a.r = m
c.q = n
c.t = n
c.s = j
c.r = j
c.x = d
c.z = a
n.q = c
n.t = c
n.s = j
n.r = j
n.x = d
n.z = a
assert j.z.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: B = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

k = A("k")
d = B("d")
j = C("j")
m = D("m")
a = E("a")
c = F("c")
n = F("n")

k.y = m
k.v = d
d.r = j
j.t = a
j.u = a
j.p = k
j.q = k
j.z = c
m.y = d
m.w = d
m.t = d
m.o = d
m.x = k
m.r = k
a.o = j
a.q = c
a.u = k
a.r = m
c.q = n
c.t = n
c.s = j
c.r = j
c.x = d
c.z = a
n.q = c
n.t = c
n.s = j
n.r = j
n.x = d
n.z = a
assert j.z.z.r.txt == "m"