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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: C = None
        self.r: I = None
        self.z: H = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: C = None
        self.r: I = None
        self.z: H = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.txt = txt

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

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

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