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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: C = None
        self.q: C = None
        self.s: B = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.w: C = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: C = None
        self.q: C = None
        self.s: B = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.w: C = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

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

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