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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.z: H = None
        self.w: D = None
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: I = None
        self.r: F = None
        self.s: B = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.r: C = None
        self.v: I = None
        self.q: I = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.z: H = None
        self.w: D = None
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: I = None
        self.r: F = None
        self.s: B = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.r: C = None
        self.v: I = None
        self.q: I = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

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

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

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