class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.t: B = None
        self.s: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

e.w = j
e.r = i
e.t = a
e.s = a
e.u = a
e.z = a
a.s = e
a.w = d
a.z = k
d.y = a
k.v = i
k.t = j
k.r = a
i.y = k
i.x = k
i.r = d
i.w = a
i.t = e
i.u = j
b.w = e
b.x = e
b.t = d
m.x = n
j.v = i
j.t = k
j.r = a
n.w = e
n.x = e
n.t = d
assert e.u.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.t: B = None
        self.s: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

e.w = j
e.r = i
e.t = a
e.s = a
e.u = a
e.z = a
a.s = e
a.w = d
a.z = k
d.y = a
k.v = i
k.t = j
k.r = a
i.y = k
i.x = k
i.r = d
i.w = a
i.t = e
i.u = j
b.w = e
b.x = e
b.t = d
m.x = n
j.v = i
j.t = k
j.r = a
n.w = e
n.x = e
n.t = d
assert e.u.z.r.txt == "a"