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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.u: E = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.u: E = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

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

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