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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.p: F = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

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

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

c.t = d
c.x = d
c.w = a
c.y = n
i.z = k
i.u = k
i.p = a
i.x = e
i.v = e
b.t = j
e.w = c
e.y = j
e.p = b
k.q = a
k.s = e
k.v = g
k.t = b
a.t = k
j.q = g
j.v = g
j.s = e
j.t = b
d.t = c
d.x = c
d.w = g
d.y = i
g.t = j
n.z = k
n.u = k
n.p = g
n.x = e
n.v = e
assert b.t.v.t.q.t.s.w.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: A = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.p: F = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

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

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

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