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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: H = None
        self.v: G = None
        self.o: A = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.z: H = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: H = None
        self.v: G = None
        self.o: A = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.z: H = None
        self.s: F = None
        self.txt = txt

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

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