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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: D = None
        self.x: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

f = A("f")
l = B("l")
h = C("h")
d = D("d")
k = E("k")
n = F("n")
i = G("i")
b = B("b")
e = E("e")

f.v = i
f.w = l
l.o = k
l.z = b
l.s = f
l.q = f
l.p = n
l.u = n
h.o = f
h.u = d
h.x = d
d.p = i
d.z = i
k.s = b
k.v = f
k.p = h
k.u = n
k.x = e
k.q = d
n.z = f
n.o = h
n.q = i
n.r = i
n.s = d
i.r = n
i.v = n
i.o = e
i.q = e
b.o = k
b.z = l
b.s = f
b.q = f
b.p = n
b.u = n
e.s = l
e.v = f
e.p = h
e.u = n
e.x = k
e.q = d
assert i.q.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: D = None
        self.x: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

f = A("f")
l = B("l")
h = C("h")
d = D("d")
k = E("k")
n = F("n")
i = G("i")
b = B("b")
e = E("e")

f.v = i
f.w = l
l.o = k
l.z = b
l.s = f
l.q = f
l.p = n
l.u = n
h.o = f
h.u = d
h.x = d
d.p = i
d.z = i
k.s = b
k.v = f
k.p = h
k.u = n
k.x = e
k.q = d
n.z = f
n.o = h
n.q = i
n.r = i
n.s = d
i.r = n
i.v = n
i.o = e
i.q = e
b.o = k
b.z = l
b.s = f
b.q = f
b.p = n
b.u = n
e.s = l
e.v = f
e.p = h
e.u = n
e.x = k
e.q = d
assert i.q.s.o.txt == "k"