class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: C = None
        self.y: F = None
        self.o: A = None
        self.x: G = None
        self.z: C = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.p: G = None
        self.v: E = None
        self.r: F = None
        self.o: D = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.p: G = None
        self.v: E = None
        self.r: F = None
        self.o: D = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

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

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