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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.v: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: C = None
        self.q: B = None
        self.u: G = None
        self.x: C = None
        self.t: H = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.v: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: C = None
        self.q: B = None
        self.u: G = None
        self.x: C = None
        self.t: H = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

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

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

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