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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.v: A = None
        self.r: I = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.r: F = None
        self.q: I = None
        self.w: F = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.v: A = None
        self.r: I = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.r: F = None
        self.q: I = None
        self.w: F = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

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

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

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