class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.x: C = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.x: C = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

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

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