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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.z: G = None
        self.t: G = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

j = A("j")
n = B("n")
e = C("e")
l = D("l")
i = E("i")
k = F("k")
b = G("b")
f = B("f")
g = E("g")

j.o = e
n.o = j
n.w = l
n.v = k
e.z = f
l.o = j
l.p = k
l.u = e
i.q = b
i.z = b
i.t = b
i.y = b
i.w = g
i.p = j
k.x = n
k.u = j
k.z = e
b.t = e
b.p = f
b.z = g
b.x = i
f.o = j
f.w = l
f.v = k
g.q = b
g.z = b
g.t = b
g.y = b
g.w = i
g.p = j
assert f.v.u.o.z.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.z: G = None
        self.t: G = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

j = A("j")
n = B("n")
e = C("e")
l = D("l")
i = E("i")
k = F("k")
b = G("b")
f = B("f")
g = E("g")

j.o = e
n.o = j
n.w = l
n.v = k
e.z = f
l.o = j
l.p = k
l.u = e
i.q = b
i.z = b
i.t = b
i.y = b
i.w = g
i.p = j
k.x = n
k.u = j
k.z = e
b.t = e
b.p = f
b.z = g
b.x = i
f.o = j
f.w = l
f.v = k
g.q = b
g.z = b
g.t = b
g.y = b
g.w = i
g.p = j
assert f.v.u.o.z.v.u.txt == "j"