class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: E = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.u: I = None
        self.s: G = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.u: I = None
        self.s: G = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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