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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: E = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.u: C = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.u: H = None
        self.v: D = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: E = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.u: C = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.u: H = None
        self.v: D = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.txt = txt

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

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