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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.o: A = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.o: A = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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