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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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

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