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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.v: C = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.u: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.v: C = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.u: B = None
        self.z: F = None
        self.txt = txt

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

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