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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: I = None
        self.s: G = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: I = None
        self.s: G = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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