class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.o: G = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: E = None
        self.t: C = None
        self.q: A = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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

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

h = A("h")
d = B("d")
a = C("a")
b = D("b")
n = E("n")
k = F("k")
i = G("i")
j = H("j")
m = I("m")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: E = None
        self.t: C = None
        self.q: A = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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

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

h = A("h")
d = B("d")
a = C("a")
b = D("b")
n = E("n")
k = F("k")
i = G("i")
j = H("j")
m = I("m")
c = B("c")

h.w = c
h.v = b
h.o = i
h.y = a
h.x = j
d.u = a
d.t = a
d.w = c
d.x = n
d.q = h
d.r = i
d.y = k
a.o = h
b.u = m
b.o = d
b.q = i
b.y = i
b.v = i
b.z = j
b.t = a
b.p = a
b.w = a
n.t = j
n.q = j
k.w = n
k.q = h
k.v = h
i.w = m
i.u = h
i.t = b
j.w = a
j.x = c
j.z = n
m.q = i
m.w = i
m.u = h
m.v = b
m.x = j
m.p = n
m.r = k
c.u = a
c.t = a
c.w = d
c.x = n
c.q = h
c.r = i
c.y = k
assert d.w.r.t.txt == "b"