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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: E = None
        self.z: F = None
        self.x: D = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.t: D = None
        self.x: F = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.o: F = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

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

j = A("j")
l = B("l")
a = C("a")
g = D("g")
c = E("c")
b = F("b")
e = G("e")
n = H("n")
m = I("m")
i = I("i")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: E = None
        self.z: F = None
        self.x: D = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.t: D = None
        self.x: F = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.o: F = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

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

j = A("j")
l = B("l")
a = C("a")
g = D("g")
c = E("c")
b = F("b")
e = G("e")
n = H("n")
m = I("m")
i = I("i")

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