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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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