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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.q: H = None
        self.o: H = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.r: G = None
        self.u: F = None
        self.o: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.s: F = None
        self.w: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.s: D = None
        self.o: E = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

k = A("k")
b = B("b")
m = C("m")
e = D("e")
l = E("l")
d = F("d")
c = G("c")
g = H("g")
i = E("i")

k.u = g
k.w = g
k.x = g
k.z = l
k.q = l
k.t = d
k.v = c
k.o = b
b.r = m
b.p = m
b.w = g
b.q = g
b.o = g
b.u = e
m.s = d
e.y = g
e.o = g
e.v = c
e.r = c
e.u = d
e.s = d
l.u = d
l.s = d
l.w = d
l.x = d
l.r = d
l.p = m
d.t = g
c.v = k
c.q = l
c.z = e
c.y = e
c.x = e
c.t = b
c.w = m
c.p = d
g.u = b
g.t = l
g.o = l
g.s = e
g.v = e
g.p = k
i.u = d
i.s = d
i.w = d
i.x = d
i.r = d
i.p = m
assert m.s.t.p.t.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.t: F = None
        self.w: H = None
        self.q: E = None
        self.x: H = None
        self.v: G = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.q: H = None
        self.o: H = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.r: G = None
        self.u: F = None
        self.o: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.s: F = None
        self.w: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.s: D = None
        self.o: E = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

k = A("k")
b = B("b")
m = C("m")
e = D("e")
l = E("l")
d = F("d")
c = G("c")
g = H("g")
i = E("i")

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