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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.w: A = None
        self.p: C = None
        self.z: C = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.w: A = None
        self.p: C = None
        self.z: C = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

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

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

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