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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.z: D = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.z: D = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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