class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: D = None
        self.r: G = None
        self.x: G = None
        self.z: B = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.w: H = None
        self.z: F = None
        self.s: A = None
        self.q: H = None
        self.p: F = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.q: D = None
        self.r: B = None
        self.t: D = None
        self.o: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: C = None
        self.u: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.w: H = None
        self.z: F = None
        self.s: A = None
        self.q: H = None
        self.p: F = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.q: D = None
        self.r: B = None
        self.t: D = None
        self.o: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: C = None
        self.u: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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