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

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

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

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

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

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

c = A("c")
n = B("n")
a = C("a")
i = D("i")
l = E("l")
j = F("j")
k = A("k")
d = E("d")
b = D("b")

c.o = b
c.r = d
c.s = n
n.y = l
a.p = k
a.t = n
a.w = n
i.x = l
l.p = c
l.y = c
l.w = b
j.r = l
j.v = n
j.u = a
j.w = k
k.o = i
k.r = d
k.s = n
d.p = k
d.w = i
d.y = c
b.x = d
assert j.r.w.x.w.x.p.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

c = A("c")
n = B("n")
a = C("a")
i = D("i")
l = E("l")
j = F("j")
k = A("k")
d = E("d")
b = D("b")

c.o = b
c.r = d
c.s = n
n.y = l
a.p = k
a.t = n
a.w = n
i.x = l
l.p = c
l.y = c
l.w = b
j.r = l
j.v = n
j.u = a
j.w = k
k.o = i
k.r = d
k.s = n
d.p = k
d.w = i
d.y = c
b.x = d
assert j.r.w.x.w.x.p.r.y.txt == "c"