class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: G = None
        self.u: E = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.z: C = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: G = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.txt = txt

e = A("e")
n = B("n")
k = C("k")
j = D("j")
m = E("m")
d = F("d")
c = G("c")
i = H("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.z: C = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: G = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.txt = txt

e = A("e")
n = B("n")
k = C("k")
j = D("j")
m = E("m")
d = F("d")
c = G("c")
i = H("i")

e.o = j
e.p = c
e.v = c
e.u = m
e.y = d
n.w = m
k.y = e
k.p = j
k.o = j
j.w = e
j.o = d
m.x = c
m.y = c
m.w = c
m.z = e
m.t = e
m.r = i
m.q = k
d.t = m
d.o = j
d.z = k
d.u = k
d.p = i
c.v = i
i.t = k
i.v = c
i.z = c
i.p = d
i.y = d
assert j.w.v.v.t.y.y.txt == "d"