class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.x: E = None
        self.t: H = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.w: G = None
        self.v: I = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.x: C = None
        self.u: A = None
        self.w: B = None
        self.q: I = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.t: E = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.o: E = None
        self.u: C = None
        self.y: C = None
        self.x: D = None
        self.p: B = None
        self.r: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.w: G = None
        self.v: I = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.x: C = None
        self.u: A = None
        self.w: B = None
        self.q: I = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.t: E = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.o: E = None
        self.u: C = None
        self.y: C = None
        self.x: D = None
        self.p: B = None
        self.r: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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