class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.o: E = None
        self.x: F = None
        self.z: F = None
        self.y: H = None
        self.u: I = None
        self.r: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: G = None
        self.z: E = None
        self.w: I = None
        self.t: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: G = None
        self.z: E = None
        self.w: I = None
        self.t: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

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

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