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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.o: A = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.o: A = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

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

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