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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

e.s = a
e.v = a
e.u = h
f.u = c
f.r = h
h.v = c
h.x = b
d.o = e
d.t = e
d.v = f
d.u = j
d.r = b
d.w = g
d.s = g
b.t = h
b.u = j
g.x = b
g.v = f
a.p = h
a.o = f
c.v = e
c.s = e
c.o = a
j.s = h
j.o = h
j.w = g
assert e.u.v.s.v.o.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: C = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

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