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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: I = None
        self.y: H = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: I = None
        self.v: I = None
        self.s: I = None
        self.w: B = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

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

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

n.v = k
n.t = l
n.z = j
n.y = c
n.u = f
n.r = e
i.p = e
i.s = e
i.r = n
i.q = k
i.o = f
i.t = l
i.y = g
g.v = e
g.u = c
g.y = l
g.z = n
g.q = n
e.r = f
e.w = j
f.p = g
f.s = k
f.z = e
k.t = c
j.q = i
j.w = i
j.u = i
j.t = c
j.v = c
j.s = c
j.p = l
l.q = g
l.z = i
c.u = k
c.z = g
c.o = f
c.w = f
c.r = f
c.p = i
c.t = i
c.v = n
c.s = l
assert c.o.p.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: H = None
        self.z: G = None
        self.y: I = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: I = None
        self.y: H = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: I = None
        self.v: I = None
        self.s: I = None
        self.w: B = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

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

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

n.v = k
n.t = l
n.z = j
n.y = c
n.u = f
n.r = e
i.p = e
i.s = e
i.r = n
i.q = k
i.o = f
i.t = l
i.y = g
g.v = e
g.u = c
g.y = l
g.z = n
g.q = n
e.r = f
e.w = j
f.p = g
f.s = k
f.z = e
k.t = c
j.q = i
j.w = i
j.u = i
j.t = c
j.v = c
j.s = c
j.p = l
l.q = g
l.z = i
c.u = k
c.z = g
c.o = f
c.w = f
c.r = f
c.p = i
c.t = i
c.v = n
c.s = l
assert c.o.p.u.s.txt == "l"