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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.v: D = None
        self.y: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.p: E = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.v: I = None
        self.y: F = None
        self.x: F = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.v: D = None
        self.y: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.p: E = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.v: I = None
        self.y: F = None
        self.x: F = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

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

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

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