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

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

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

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

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

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

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

c.v = k
c.y = g
c.w = e
m.t = n
m.w = g
m.y = l
m.v = c
m.p = c
m.u = c
i.r = g
g.v = k
g.r = l
g.w = l
g.q = m
k.p = i
k.v = i
k.u = d
e.p = c
e.w = c
e.u = m
e.r = m
e.v = g
e.o = d
d.r = g
n.p = l
n.u = m
n.r = m
n.w = c
n.v = g
n.o = i
l.v = k
l.y = g
l.w = n
assert e.w.y.q.u.v.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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