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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: A = None
        self.s: D = None
        self.p: G = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: E = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: A = None
        self.s: D = None
        self.p: G = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: E = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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