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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.v: A = None
        self.z: B = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.q: C = None
        self.u: B = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.v: A = None
        self.z: B = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.q: C = None
        self.u: B = None
        self.o: F = None
        self.txt = txt

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

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