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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.z: D = None
        self.p: I = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.y: A = None
        self.t: D = None
        self.s: B = None
        self.x: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: F = None
        self.t: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.s: H = None
        self.p: C = None
        self.z: E = None
        self.t: C = None
        self.w: A = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.z: D = None
        self.p: I = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.y: A = None
        self.t: D = None
        self.s: B = None
        self.x: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: F = None
        self.t: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.s: H = None
        self.p: C = None
        self.z: E = None
        self.t: C = None
        self.w: A = None
        self.y: D = None
        self.txt = txt

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

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