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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

m = A("m")
d = B("d")
h = C("h")
e = D("e")
b = E("b")
f = F("f")
k = E("k")

m.v = h
m.o = h
m.w = d
d.p = h
d.s = m
d.x = m
d.t = e
h.w = f
h.p = e
h.r = m
e.y = b
e.v = k
e.o = k
b.s = h
b.u = h
b.v = f
b.w = k
b.q = e
b.p = m
f.u = b
f.w = k
f.r = d
k.s = h
k.u = h
k.v = f
k.w = b
k.q = e
k.p = m
assert e.o.v.r.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

m = A("m")
d = B("d")
h = C("h")
e = D("e")
b = E("b")
f = F("f")
k = E("k")

m.v = h
m.o = h
m.w = d
d.p = h
d.s = m
d.x = m
d.t = e
h.w = f
h.p = e
h.r = m
e.y = b
e.v = k
e.o = k
b.s = h
b.u = h
b.v = f
b.w = k
b.q = e
b.p = m
f.u = b
f.w = k
f.r = d
k.s = h
k.u = h
k.v = f
k.w = b
k.q = e
k.p = m
assert e.o.v.r.p.r.txt == "m"