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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.r: B = None
        self.o: F = None
        self.u: F = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: I = None
        self.z: B = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: H = None
        self.y: D = None
        self.u: B = None
        self.q: F = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: D = None
        self.p: F = None
        self.v: C = None
        self.w: B = None
        self.t: I = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.r: B = None
        self.o: F = None
        self.u: F = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: I = None
        self.z: B = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: H = None
        self.y: D = None
        self.u: B = None
        self.q: F = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: D = None
        self.p: F = None
        self.v: C = None
        self.w: B = None
        self.t: I = None
        self.o: B = None
        self.txt = txt

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

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

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

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