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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.v: E = None
        self.s: A = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

l = A("l")
a = B("a")
c = C("c")
n = D("n")
m = E("m")
j = F("j")
b = A("b")
h = B("h")
e = E("e")
f = F("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.v: E = None
        self.s: A = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

l = A("l")
a = B("a")
c = C("c")
n = D("n")
m = E("m")
j = F("j")
b = A("b")
h = B("h")
e = E("e")
f = F("f")

l.r = j
l.s = e
l.z = b
l.t = n
a.p = c
a.t = c
a.v = j
a.w = l
a.u = m
c.v = n
c.z = n
c.q = n
n.u = l
m.r = a
m.o = e
m.v = e
m.s = l
m.y = j
m.u = c
j.x = c
b.r = f
b.s = m
b.z = l
b.t = n
h.p = c
h.t = c
h.v = f
h.w = l
h.u = m
e.r = a
e.o = m
e.v = m
e.s = l
e.y = j
e.u = c
f.x = c
assert n.u.r.x.txt == "c"