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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.w: F = None
        self.t: A = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.w: F = None
        self.t: A = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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