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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.w: H = None
        self.q: H = None
        self.v: E = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.w: H = None
        self.q: H = None
        self.v: E = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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