class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.p: D = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

f = A("f")
a = B("a")
k = C("k")
c = D("c")
e = E("e")
m = F("m")
h = G("h")
n = E("n")
l = D("l")
j = G("j")

f.y = c
f.s = a
a.u = f
a.y = e
k.o = n
k.x = f
k.t = j
k.z = h
c.p = n
c.u = h
c.s = f
c.v = k
e.y = k
e.z = a
e.p = c
e.q = h
e.v = m
m.o = h
m.u = f
m.q = e
m.x = c
h.s = e
n.y = k
n.z = a
n.p = l
n.q = j
n.v = m
l.p = e
l.u = h
l.s = f
l.v = k
j.s = n
assert k.o.q.s.q.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.p: D = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

f = A("f")
a = B("a")
k = C("k")
c = D("c")
e = E("e")
m = F("m")
h = G("h")
n = E("n")
l = D("l")
j = G("j")

f.y = c
f.s = a
a.u = f
a.y = e
k.o = n
k.x = f
k.t = j
k.z = h
c.p = n
c.u = h
c.s = f
c.v = k
e.y = k
e.z = a
e.p = c
e.q = h
e.v = m
m.o = h
m.u = f
m.q = e
m.x = c
h.s = e
n.y = k
n.z = a
n.p = l
n.q = j
n.v = m
l.p = e
l.u = h
l.s = f
l.v = k
j.s = n
assert k.o.q.s.q.s.p.txt == "l"