class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.p: E = None
        self.q: C = None
        self.r: B = None
        self.w: E = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.x: E = None
        self.t: A = None
        self.y: A = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.z: C = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.o: B = None
        self.z: F = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.x: E = None
        self.t: A = None
        self.y: A = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.z: C = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.o: B = None
        self.z: F = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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