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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.v: H = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

h = A("h")
e = B("e")
c = C("c")
i = D("i")
b = E("b")
a = F("a")
g = G("g")
m = H("m")
j = I("j")
n = J("n")

h.s = c
h.u = c
e.t = a
e.o = m
c.p = j
i.o = c
b.s = g
b.y = g
b.t = e
b.v = m
b.q = h
a.s = b
a.o = g
a.v = g
a.y = c
a.r = i
a.q = i
g.r = a
g.v = a
g.p = i
m.t = c
m.q = h
j.y = h
n.p = c
n.w = c
n.v = c
n.s = h
assert g.p.o.p.y.u.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.v: H = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

h = A("h")
e = B("e")
c = C("c")
i = D("i")
b = E("b")
a = F("a")
g = G("g")
m = H("m")
j = I("j")
n = J("n")

h.s = c
h.u = c
e.t = a
e.o = m
c.p = j
i.o = c
b.s = g
b.y = g
b.t = e
b.v = m
b.q = h
a.s = b
a.o = g
a.v = g
a.y = c
a.r = i
a.q = i
g.r = a
g.v = a
g.p = i
m.t = c
m.q = h
j.y = h
n.p = c
n.w = c
n.v = c
n.s = h
assert g.p.o.p.y.u.p.y.txt == "h"