class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.p: D = None
        self.q: J = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.t: E = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: A = None
        self.r: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

l.u = j
l.t = c
l.p = d
l.q = g
l.v = m
a.z = l
a.t = n
a.v = n
a.x = b
a.u = d
a.w = g
a.o = g
a.s = k
k.x = n
k.t = n
k.s = c
k.y = m
k.u = l
d.q = n
d.o = c
n.w = c
m.z = g
m.x = l
m.r = k
m.w = b
j.y = n
j.w = a
j.p = l
c.q = l
c.w = k
c.y = b
b.s = n
b.v = k
g.q = m
g.x = m
g.z = j
g.o = d
g.s = d
g.t = c
g.v = c
g.w = c
g.y = a
g.u = l
assert j.y.w.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.p: D = None
        self.q: J = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.t: E = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: A = None
        self.r: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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