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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: I = None
        self.y: C = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.v: C = None
        self.o: G = None
        self.u: C = None
        self.z: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: D = None
        self.w: A = None
        self.x: B = None
        self.v: A = None
        self.z: H = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: I = None
        self.y: C = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.v: C = None
        self.o: G = None
        self.u: C = None
        self.z: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: D = None
        self.w: A = None
        self.x: B = None
        self.v: A = None
        self.z: H = None
        self.u: B = None
        self.txt = txt

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

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