class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: C = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.u: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.z: G = None
        self.x: C = None
        self.txt = txt

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

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

k = A("k")
g = B("g")
i = C("i")
e = D("e")
c = E("c")
j = F("j")
h = G("h")
d = E("d")
b = A("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.u: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.z: G = None
        self.x: C = None
        self.txt = txt

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

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

k = A("k")
g = B("g")
i = C("i")
e = D("e")
c = E("c")
j = F("j")
h = G("h")
d = E("d")
b = A("b")

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