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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.u: H = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: D = None
        self.r: I = None
        self.q: D = None
        self.p: C = None
        self.x: H = None
        self.v: B = None
        self.o: I = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.u: H = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: D = None
        self.r: I = None
        self.q: D = None
        self.p: C = None
        self.x: H = None
        self.v: B = None
        self.o: I = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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