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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.w: G = None
        self.s: C = None
        self.q: H = None
        self.v: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.r: G = None
        self.w: C = None
        self.s: D = None
        self.q: C = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

f = A("f")
i = B("i")
h = C("h")
l = D("l")
c = E("c")
e = F("e")
b = G("b")
m = H("m")
n = C("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.w: G = None
        self.s: C = None
        self.q: H = None
        self.v: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.r: G = None
        self.w: C = None
        self.s: D = None
        self.q: C = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

f = A("f")
i = B("i")
h = C("h")
l = D("l")
c = E("c")
e = F("e")
b = G("b")
m = H("m")
n = C("n")

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