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

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

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

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

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

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

c = A("c")
l = B("l")
h = C("h")
f = D("f")
k = E("k")
n = F("n")
i = F("i")
m = D("m")

c.o = k
l.x = h
l.t = h
l.p = h
l.r = c
l.w = k
l.u = k
h.v = l
h.r = l
h.p = i
h.y = k
h.t = f
f.r = h
f.x = c
f.w = l
k.t = i
n.o = f
n.y = k
n.p = k
n.t = i
n.z = c
n.v = l
i.o = f
i.y = k
i.p = k
i.t = n
i.z = c
i.v = l
m.r = h
m.x = c
m.w = l
assert n.t.z.o.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
l = B("l")
h = C("h")
f = D("f")
k = E("k")
n = F("n")
i = F("i")
m = D("m")

c.o = k
l.x = h
l.t = h
l.p = h
l.r = c
l.w = k
l.u = k
h.v = l
h.r = l
h.p = i
h.y = k
h.t = f
f.r = h
f.x = c
f.w = l
k.t = i
n.o = f
n.y = k
n.p = k
n.t = i
n.z = c
n.v = l
i.o = f
i.y = k
i.p = k
i.t = n
i.z = c
i.v = l
m.r = h
m.x = c
m.w = l
assert n.t.z.o.t.y.txt == "k"