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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.z: E = None
        self.p: A = None
        self.u: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

b = A("b")
n = B("n")
c = C("c")
a = D("a")
l = E("l")
d = F("d")
i = G("i")
k = A("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.z: E = None
        self.p: A = None
        self.u: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

b = A("b")
n = B("n")
c = C("c")
a = D("a")
l = E("l")
d = F("d")
i = G("i")
k = A("k")

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