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

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

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

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

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

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

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

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

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

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

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

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

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

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

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