class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.u: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.z: F = None
        self.r: G = None
        self.w: A = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.u: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.z: F = None
        self.r: G = None
        self.w: A = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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