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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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