class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.t: C = None
        self.o: B = None
        self.x: C = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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