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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.x: G = None
        self.p: H = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.r: D = None
        self.s: E = None
        self.p: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.q: G = None
        self.p: A = None
        self.z: C = None
        self.o: F = None
        self.txt = txt

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

b.o = a
b.w = a
n.s = e
f.o = g
f.t = g
j.y = a
j.s = g
j.p = g
j.x = l
j.o = l
j.v = d
a.p = e
a.v = e
a.q = n
d.q = j
d.x = e
d.v = e
l.v = d
l.z = e
l.w = e
l.r = j
l.s = a
l.p = a
g.s = b
g.t = b
g.p = b
g.q = l
g.z = f
g.o = e
m.o = a
m.w = a
e.q = j
e.x = d
e.v = d
assert b.o.v.q.x.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.x: G = None
        self.p: H = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.r: D = None
        self.s: E = None
        self.p: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.q: G = None
        self.p: A = None
        self.z: C = None
        self.o: F = None
        self.txt = txt

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

b.o = a
b.w = a
n.s = e
f.o = g
f.t = g
j.y = a
j.s = g
j.p = g
j.x = l
j.o = l
j.v = d
a.p = e
a.v = e
a.q = n
d.q = j
d.x = e
d.v = e
l.v = d
l.z = e
l.w = e
l.r = j
l.s = a
l.p = a
g.s = b
g.t = b
g.p = b
g.q = l
g.z = f
g.o = e
m.o = a
m.w = a
e.q = j
e.x = d
e.v = d
assert b.o.v.q.x.z.x.txt == "d"