class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.p: C = None
        self.q: D = None
        self.y: E = None
        self.s: E = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.v: E = None
        self.u: C = None
        self.r: F = None
        self.x: H = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.v: E = None
        self.u: C = None
        self.r: F = None
        self.x: H = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

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