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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.x: D = None
        self.v: H = None
        self.q: B = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.p: E = None
        self.u: D = None
        self.y: B = None
        self.w: H = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.v: G = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

c.t = k
k.v = e
k.q = f
k.o = f
k.w = f
k.p = a
j.v = a
j.y = c
j.o = m
e.u = g
e.o = j
g.y = e
g.q = e
m.y = g
m.s = g
m.u = f
m.v = f
m.x = e
m.q = k
a.v = k
a.q = k
a.y = k
a.p = g
a.u = e
a.o = e
a.w = f
a.s = j
f.x = c
f.p = k
f.v = a
f.s = m
f.o = e
assert k.p.y.p.u.o.o.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.x: D = None
        self.v: H = None
        self.q: B = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.p: E = None
        self.u: D = None
        self.y: B = None
        self.w: H = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.v: G = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

c.t = k
k.v = e
k.q = f
k.o = f
k.w = f
k.p = a
j.v = a
j.y = c
j.o = m
e.u = g
e.o = j
g.y = e
g.q = e
m.y = g
m.s = g
m.u = f
m.v = f
m.x = e
m.q = k
a.v = k
a.q = k
a.y = k
a.p = g
a.u = e
a.o = e
a.w = f
a.s = j
f.x = c
f.p = k
f.v = a
f.s = m
f.o = e
assert k.p.y.p.u.o.o.y.q.txt == "e"