class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.y: G = None
        self.o: B = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.r: H = None
        self.y: G = None
        self.x: H = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: B = None
        self.z: F = None
        self.u: B = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.r: H = None
        self.y: G = None
        self.x: H = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: B = None
        self.z: F = None
        self.u: B = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

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

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