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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.v: C = None
        self.z: H = None
        self.o: A = None
        self.r: C = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.v: C = None
        self.z: H = None
        self.o: A = None
        self.r: C = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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