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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.s: D = None
        self.x: A = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.x: G = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.o: G = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.s: D = None
        self.x: A = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.x: G = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.o: G = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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