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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.r: G = None
        self.p: C = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.z: B = None
        self.w: D = None
        self.s: F = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
c = D("c")
g = E("g")
n = F("n")
b = G("b")
m = H("m")
k = G("k")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.r: G = None
        self.p: C = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.z: B = None
        self.w: D = None
        self.s: F = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
c = D("c")
g = E("g")
n = F("n")
b = G("b")
m = H("m")
k = G("k")
j = H("j")

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