class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: B = None
        self.t: G = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.v: A = None
        self.u: D = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.p: C = None
        self.u: E = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: B = None
        self.t: G = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.v: A = None
        self.u: D = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.p: C = None
        self.u: E = None
        self.o: C = None
        self.txt = txt

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

k.x = e
k.w = m
k.q = l
e.o = l
e.r = l
e.x = l
e.q = i
b.q = m
b.o = d
b.p = e
b.t = i
b.s = i
b.y = i
d.s = e
d.y = b
n.t = m
n.o = e
n.v = k
n.u = d
n.w = d
n.s = d
l.y = n
l.v = d
l.t = b
i.x = k
i.s = b
i.p = b
i.o = b
i.u = n
f.t = k
f.v = k
f.o = e
f.u = d
f.w = d
f.s = d
m.x = e
m.w = k
m.q = l
c.t = m
c.v = m
c.o = e
c.u = d
c.w = d
c.s = d
assert c.o.q.u.w.s.q.o.s.txt == "i"