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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.z: E = None
        self.x: B = None
        self.q: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.z: E = None
        self.x: B = None
        self.q: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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