class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: C = None
        self.v: E = None
        self.z: B = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: D = None
        self.p: D = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: C = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: D = None
        self.p: D = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: C = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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