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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.u: G = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.u: G = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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