class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: I = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: A = None
        self.p: H = None
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: I = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: A = None
        self.p: H = None
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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