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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

b.v = c
b.x = c
b.o = e
b.q = a
i.v = g
i.q = g
i.y = e
i.x = j
i.u = b
l.o = b
l.t = c
e.v = g
e.z = i
n.p = g
n.v = e
n.o = a
n.t = l
n.r = b
c.y = g
j.x = c
j.t = a
j.v = b
h.v = i
h.z = i
g.v = i
g.q = i
g.y = e
g.x = j
g.u = b
a.x = c
a.t = j
a.v = b
assert c.y.u.x.y.v.y.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.q: G = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

b.v = c
b.x = c
b.o = e
b.q = a
i.v = g
i.q = g
i.y = e
i.x = j
i.u = b
l.o = b
l.t = c
e.v = g
e.z = i
n.p = g
n.v = e
n.o = a
n.t = l
n.r = b
c.y = g
j.x = c
j.t = a
j.v = b
h.v = i
h.z = i
g.v = i
g.q = i
g.y = e
g.x = j
g.u = b
a.x = c
a.t = j
a.v = b
assert c.y.u.x.y.v.y.v.x.txt == "j"