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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.o: B = None
        self.p: A = None
        self.q: A = None
        self.t: G = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.o: B = None
        self.p: A = None
        self.q: A = None
        self.t: G = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.txt = txt

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

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