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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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