class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: G = None
        self.r: I = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.z: E = None
        self.o: A = None
        self.x: F = None
        self.q: E = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.s: H = None
        self.x: A = None
        self.w: I = None
        self.p: E = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.w: I = None
        self.t: B = None
        self.u: B = None
        self.txt = txt

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

d = A("d")
j = B("j")
n = C("n")
h = D("h")
l = E("l")
e = F("e")
b = G("b")
g = H("g")
a = I("a")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.z: E = None
        self.o: A = None
        self.x: F = None
        self.q: E = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.s: H = None
        self.x: A = None
        self.w: I = None
        self.p: E = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.w: I = None
        self.t: B = None
        self.u: B = None
        self.txt = txt

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

d = A("d")
j = B("j")
n = C("n")
h = D("h")
l = E("l")
e = F("e")
b = G("b")
g = H("g")
a = I("a")

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