class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.w: H = 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.w: H = None
        self.s: B = None
        self.r: H = None
        self.p: D = None
        self.q: G = None
        self.x: H = None
        self.o: D = None
        self.v: I = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.w: H = 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.w: H = None
        self.s: B = None
        self.r: H = None
        self.p: D = None
        self.q: G = None
        self.x: H = None
        self.o: D = None
        self.v: I = None
        self.z: H = None
        self.txt = txt

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

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

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

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

m.x = l
m.r = i
f.u = n
c.q = n
c.s = l
c.r = g
c.t = a
c.w = h
i.s = g
i.o = l
i.w = h
a.u = m
g.w = h
g.r = h
g.x = h
g.z = h
g.s = f
g.p = i
g.o = i
g.q = l
g.v = n
l.r = i
l.p = f
h.q = n
n.z = c
n.u = c
n.w = i
n.q = h
n.v = h
n.o = a
n.x = l
assert a.u.x.r.w.q.o.u.txt == "m"