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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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