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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.t: B = None
        self.v: F = None
        self.y: A = None
        self.p: B = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: A = None
        self.v: G = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: F = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.t: B = None
        self.v: F = None
        self.y: A = None
        self.p: B = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: A = None
        self.v: G = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: F = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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

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