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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.q: J = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.t: E = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.u: E = None
        self.t: D = None
        self.s: C = None
        self.x: J = None
        self.o: G = None
        self.txt = txt

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

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

j.z = k
j.t = k
k.z = d
k.o = b
k.q = h
k.y = l
k.p = g
i.v = b
i.x = j
i.t = g
i.o = l
i.w = h
l.z = b
g.x = c
g.u = f
c.p = g
b.s = j
d.z = j
d.s = g
f.q = j
f.p = i
f.s = i
f.u = g
f.t = l
f.x = h
f.o = b
h.u = l
assert l.z.s.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.q: J = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.t: E = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.u: E = None
        self.t: D = None
        self.s: C = None
        self.x: J = None
        self.o: G = None
        self.txt = txt

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

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

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