class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.w: D = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.txt = txt

g = A("g")
m = B("m")
i = C("i")
d = D("d")
l = E("l")
h = F("h")
c = G("c")
b = E("b")
e = G("e")

g.v = m
g.r = h
g.w = d
g.y = e
g.o = l
m.w = l
m.z = d
m.p = d
m.r = g
i.w = g
i.x = l
d.o = i
d.w = h
d.u = m
d.p = l
l.z = e
l.u = h
l.w = i
l.r = i
l.y = b
h.y = i
h.t = e
c.t = d
c.v = d
b.z = c
b.u = h
b.w = i
b.r = i
b.y = l
e.t = d
e.v = d
assert g.o.y.z.t.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.w: D = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.txt = txt

g = A("g")
m = B("m")
i = C("i")
d = D("d")
l = E("l")
h = F("h")
c = G("c")
b = E("b")
e = G("e")

g.v = m
g.r = h
g.w = d
g.y = e
g.o = l
m.w = l
m.z = d
m.p = d
m.r = g
i.w = g
i.x = l
d.o = i
d.w = h
d.u = m
d.p = l
l.z = e
l.u = h
l.w = i
l.r = i
l.y = b
h.y = i
h.t = e
c.t = d
c.v = d
b.z = c
b.u = h
b.w = i
b.r = i
b.y = l
e.t = d
e.v = d
assert g.o.y.z.t.w.t.txt == "e"