class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.z: C = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: A = None
        self.y: B = None
        self.r: A = None
        self.v: H = None
        self.p: D = None
        self.u: H = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.s: I = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: A = None
        self.y: B = None
        self.r: A = None
        self.v: H = None
        self.p: D = None
        self.u: H = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.s: I = None
        self.o: D = None
        self.txt = txt

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

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

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

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