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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: A = None
        self.txt = txt

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

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