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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.o: G = None
        self.s: E = None
        self.z: D = None
        self.y: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.o: A = None
        self.y: E = None
        self.z: C = None
        self.u: D = None
        self.q: G = None
        self.txt = txt

k = A("k")
a = B("a")
b = C("b")
e = D("e")
f = E("f")
i = F("i")
c = G("c")
m = G("m")
h = E("h")
j = C("j")

k.y = e
a.r = f
b.r = a
b.y = a
b.v = e
b.z = e
b.o = c
b.s = h
b.x = k
e.v = k
e.y = a
e.x = j
f.o = m
i.y = m
i.o = h
i.r = e
c.r = j
c.z = j
c.s = k
c.o = k
c.y = h
c.u = e
c.q = m
m.r = b
m.z = b
m.s = k
m.o = k
m.y = h
m.u = e
m.q = c
h.o = c
j.r = a
j.y = a
j.v = e
j.z = e
j.o = c
j.s = h
j.x = k
assert f.o.u.y.r.o.q.u.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.o: G = None
        self.s: E = None
        self.z: D = None
        self.y: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.o: A = None
        self.y: E = None
        self.z: C = None
        self.u: D = None
        self.q: G = None
        self.txt = txt

k = A("k")
a = B("a")
b = C("b")
e = D("e")
f = E("f")
i = F("i")
c = G("c")
m = G("m")
h = E("h")
j = C("j")

k.y = e
a.r = f
b.r = a
b.y = a
b.v = e
b.z = e
b.o = c
b.s = h
b.x = k
e.v = k
e.y = a
e.x = j
f.o = m
i.y = m
i.o = h
i.r = e
c.r = j
c.z = j
c.s = k
c.o = k
c.y = h
c.u = e
c.q = m
m.r = b
m.z = b
m.s = k
m.o = k
m.y = h
m.u = e
m.q = c
h.o = c
j.r = a
j.y = a
j.v = e
j.z = e
j.o = c
j.s = h
j.x = k
assert f.o.u.y.r.o.q.u.v.y.txt == "e"