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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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