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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.o: I = None
        self.u: I = None
        self.y: E = None
        self.r: F = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: G = None
        self.t: G = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.o: I = None
        self.u: I = None
        self.y: E = None
        self.r: F = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: G = None
        self.t: G = None
        self.z: F = None
        self.txt = txt

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

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