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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.r: F = None
        self.q: A = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

j = A("j")
a = B("a")
i = C("i")
e = D("e")
n = E("n")
h = F("h")
c = G("c")

j.w = n
j.s = a
a.t = i
a.z = c
i.v = c
i.t = n
e.v = h
e.z = j
e.y = j
e.t = a
e.p = c
e.x = c
e.s = n
n.y = h
n.s = j
h.u = n
h.x = j
h.o = c
c.v = a
c.p = j
c.q = j
c.r = h
c.z = i
c.t = e
assert n.y.u.s.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.r: F = None
        self.q: A = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

j = A("j")
a = B("a")
i = C("i")
e = D("e")
n = E("n")
h = F("h")
c = G("c")

j.w = n
j.s = a
a.t = i
a.z = c
i.v = c
i.t = n
e.v = h
e.z = j
e.y = j
e.t = a
e.p = c
e.x = c
e.s = n
n.y = h
n.s = j
h.u = n
h.x = j
h.o = c
c.v = a
c.p = j
c.q = j
c.r = h
c.z = i
c.t = e
assert n.y.u.s.s.z.txt == "c"