class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.r: B = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.u: B = None
        self.r: C = None
        self.s: E = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.v: E = None
        self.q: E = None
        self.r: G = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.u: B = None
        self.r: C = None
        self.s: E = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.v: E = None
        self.q: E = None
        self.r: G = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

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

d.z = j
d.p = b
d.r = l
d.w = e
d.u = e
l.u = h
l.v = f
l.r = d
l.z = e
f.x = j
f.z = d
f.r = n
f.w = h
b.s = f
b.p = f
b.o = j
b.t = e
b.y = n
b.q = l
e.v = j
e.q = j
e.y = h
g.y = d
g.p = d
g.u = l
g.r = f
g.s = e
g.z = e
g.q = n
j.t = l
n.o = h
h.y = b
h.s = b
h.x = e
h.v = e
h.q = e
h.r = j
h.w = f
assert l.r.w.y.txt == "h"