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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.t: F = None
        self.r: E = None
        self.q: B = None
        self.z: E = None
        self.p: F = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.t: F = None
        self.r: E = None
        self.q: B = None
        self.z: E = None
        self.p: F = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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