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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: G = None
        self.q: C = None
        self.z: D = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: G = None
        self.q: C = None
        self.z: D = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

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