class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: I = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.y: H = None
        self.r: G = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.y: H = None
        self.r: G = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

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

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