class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: H = None
        self.w: F = None
        self.y: H = None
        self.q: F = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.x: E = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.t: E = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: F = None
        self.w: C = None
        self.z: C = None
        self.p: F = None
        self.o: H = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.x: E = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.t: E = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: F = None
        self.w: C = None
        self.z: C = None
        self.p: F = None
        self.o: H = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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