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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: G = None
        self.o: B = None
        self.t: D = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: G = None
        self.o: B = None
        self.t: D = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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