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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: H = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.y: I = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: J = None
        self.y: F = None
        self.v: I = None
        self.u: F = None
        self.x: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.v: H = None
        self.r: E = None
        self.w: A = None
        self.o: C = None
        self.s: H = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: H = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.y: I = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: J = None
        self.y: F = None
        self.v: I = None
        self.u: F = None
        self.x: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.v: H = None
        self.r: E = None
        self.w: A = None
        self.o: C = None
        self.s: H = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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