class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: B = None
        self.t: H = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: F = None
        self.x: D = None
        self.r: A = None
        self.t: I = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

e.r = l
e.t = l
e.p = f
e.z = f
e.y = b
f.s = j
f.x = j
f.u = c
f.r = e
f.t = n
f.q = n
d.t = b
d.q = b
d.v = n
j.t = d
j.z = a
j.q = e
a.w = j
a.y = c
c.v = l
b.z = d
b.t = d
b.u = l
l.r = j
l.t = j
n.r = a
n.z = a
n.w = l
k.s = j
k.x = j
k.u = c
k.r = e
k.t = n
k.q = n
assert c.v.r.t.t.z.q.u.t.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: B = None
        self.t: H = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: F = None
        self.x: D = None
        self.r: A = None
        self.t: I = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

e.r = l
e.t = l
e.p = f
e.z = f
e.y = b
f.s = j
f.x = j
f.u = c
f.r = e
f.t = n
f.q = n
d.t = b
d.q = b
d.v = n
j.t = d
j.z = a
j.q = e
a.w = j
a.y = c
c.v = l
b.z = d
b.t = d
b.u = l
l.r = j
l.t = j
n.r = a
n.z = a
n.w = l
k.s = j
k.x = j
k.u = c
k.r = e
k.t = n
k.q = n
assert c.v.r.t.t.z.q.u.t.z.w.txt == "j"