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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

m = A("m")
c = B("c")
e = C("e")
b = D("b")
d = E("d")
n = F("n")
j = G("j")
h = C("h")
a = F("a")
g = G("g")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

m = A("m")
c = B("c")
e = C("e")
b = D("b")
d = E("d")
n = F("n")
j = G("j")
h = C("h")
a = F("a")
g = G("g")

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