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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.r: F = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.r: F = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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