class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: E = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.o: B = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

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

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

f = A("f")
b = B("b")
l = C("l")
g = D("g")
k = E("k")
a = F("a")
e = G("e")
m = G("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.o: B = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

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

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

f = A("f")
b = B("b")
l = C("l")
g = D("g")
k = E("k")
a = F("a")
e = G("e")
m = G("m")

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