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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.w: A = None
        self.z: F = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.u: C = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.w: A = None
        self.z: F = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.u: C = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

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

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