class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.r: F = None
        self.s: H = None
        self.t: G = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.txt = txt

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

e.x = f
e.q = l
e.r = i
e.s = b
e.t = d
e.p = g
a.x = d
g.z = a
g.v = e
g.o = j
g.x = j
g.t = n
g.p = n
g.r = b
f.x = d
j.t = b
j.o = e
i.r = d
i.o = d
i.w = d
i.z = j
i.t = b
i.v = e
d.o = l
d.v = l
d.p = i
d.s = f
d.x = e
b.t = f
b.p = d
n.z = l
n.v = e
n.o = j
n.x = j
n.t = g
n.p = g
n.r = b
l.x = d
assert g.r.t.x.p.v.q.x.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.r: F = None
        self.s: H = None
        self.t: G = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.txt = txt

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

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