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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.w: H = None
        self.t: C = None
        self.u: C = None
        self.o: F = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.w: H = None
        self.t: C = None
        self.u: C = None
        self.o: F = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

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

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

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