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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.w: B = None
        self.x: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.w: B = None
        self.x: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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