class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: G = None
        self.r: E = None
        self.s: F = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.o: D = None
        self.z: D = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.y: F = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.x: G = None
        self.y: E = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
i = D("i")
g = E("g")
k = F("k")
b = G("b")
j = H("j")
h = I("h")

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.o: D = None
        self.z: D = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.y: F = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.x: G = None
        self.y: E = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
i = D("i")
g = E("g")
k = F("k")
b = G("b")
j = H("j")
h = I("h")

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