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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: E = None
        self.q: B = None
        self.s: F = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.s: A = None
        self.u: E = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: E = None
        self.q: B = None
        self.s: F = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.s: A = None
        self.u: E = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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

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