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

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

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

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

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

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

k = A("k")
i = B("i")
e = C("e")
m = D("m")
h = E("h")
g = F("g")
b = C("b")
l = F("l")

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

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

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

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

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

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

k = A("k")
i = B("i")
e = C("e")
m = D("m")
h = E("h")
g = F("g")
b = C("b")
l = F("l")

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