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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.w: A = None
        self.v: C = None
        self.x: I = None
        self.s: B = None
        self.p: B = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.s: F = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.w: A = None
        self.v: C = None
        self.x: I = None
        self.s: B = None
        self.p: B = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.s: F = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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