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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.t: A = None
        self.o: A = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

l = A("l")
a = B("a")
b = C("b")
n = D("n")
k = E("k")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.t: A = None
        self.o: A = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

l = A("l")
a = B("a")
b = C("b")
n = D("n")
k = E("k")
e = F("e")

l.r = b
l.u = b
l.p = b
l.x = a
l.o = a
l.s = n
a.q = n
a.x = e
a.p = k
a.r = b
b.u = a
b.v = a
b.x = a
b.s = k
b.p = l
n.s = l
n.y = e
n.w = b
k.p = b
k.s = b
k.x = e
k.q = e
k.t = l
k.o = l
e.p = k
e.x = k
e.v = a
e.t = l
e.o = l
e.q = l
assert k.s.p.o.txt == "a"