class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.u: F = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: D = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.v: F = None
        self.y: A = None
        self.r: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: D = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.v: F = None
        self.y: A = None
        self.r: B = None
        self.q: G = None
        self.txt = txt

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

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