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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.t: E = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.o: D = None
        self.t: D = None
        self.u: F = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.t: E = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.o: D = None
        self.t: D = None
        self.u: F = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

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

a.t = f
a.s = f
a.v = j
a.z = j
a.w = c
j.u = d
j.w = d
j.r = d
j.z = e
e.s = a
e.y = c
e.z = f
e.v = b
e.t = d
n.o = d
n.w = d
n.v = g
n.t = f
n.s = b
f.v = c
f.u = c
f.z = g
f.r = d
d.o = n
d.t = b
d.u = j
d.x = i
d.r = f
d.q = g
d.y = a
b.q = f
b.r = g
b.o = n
b.t = n
b.v = n
b.u = d
b.x = j
i.s = a
i.y = n
i.z = f
i.v = b
i.t = d
g.t = f
g.s = f
g.v = j
g.z = j
g.w = c
c.o = d
c.w = d
c.v = a
c.t = f
c.s = b
assert j.z.y.w.t.r.t.v.s.u.txt == "d"