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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: F = None
        self.u: C = None
        self.o: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.r: B = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: F = None
        self.u: C = None
        self.o: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.r: B = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

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

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

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