class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: G = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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