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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: A = None
        self.x: C = None
        self.w: F = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.x: E = None
        self.z: J = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.u: J = None
        self.p: F = None
        self.o: F = None
        self.x: I = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: A = None
        self.w: F = None
        self.r: A = None
        self.x: F = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: A = None
        self.x: C = None
        self.w: F = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.x: E = None
        self.z: J = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.u: J = None
        self.p: F = None
        self.o: F = None
        self.x: I = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: A = None
        self.w: F = None
        self.r: A = None
        self.x: F = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.x: H = None
        self.txt = txt

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

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