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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.y: B = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

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

m = A("m")
a = B("a")
c = C("c")
l = D("l")
b = E("b")
e = F("e")
k = C("k")
f = F("f")
i = B("i")
d = F("d")

m.r = k
m.y = e
a.w = c
a.r = b
c.s = d
c.o = l
c.y = a
c.q = a
c.w = f
l.o = d
l.s = b
l.p = b
l.z = e
l.v = c
l.q = k
b.o = k
b.r = m
b.v = i
e.t = d
e.s = k
k.s = e
k.o = l
k.y = i
k.q = a
k.w = f
f.t = e
f.s = c
i.w = k
i.r = b
d.t = e
d.s = c
assert l.p.r.y.s.s.s.q.r.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.y: B = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

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

m = A("m")
a = B("a")
c = C("c")
l = D("l")
b = E("b")
e = F("e")
k = C("k")
f = F("f")
i = B("i")
d = F("d")

m.r = k
m.y = e
a.w = c
a.r = b
c.s = d
c.o = l
c.y = a
c.q = a
c.w = f
l.o = d
l.s = b
l.p = b
l.z = e
l.v = c
l.q = k
b.o = k
b.r = m
b.v = i
e.t = d
e.s = k
k.s = e
k.o = l
k.y = i
k.q = a
k.w = f
f.t = e
f.s = c
i.w = k
i.r = b
d.t = e
d.s = c
assert l.p.r.y.s.s.s.q.r.v.w.txt == "k"