class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.x: D = None
        self.s: B = None
        self.p: A = None
        self.q: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.x: D = None
        self.s: B = None
        self.p: A = None
        self.q: B = None
        self.y: D = None
        self.txt = txt

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

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